{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <a href="/diyform/diyform_field/manage/?action=add&modelid={{$modelid}}" class="btn btn-primary bar-btn"><i class="fa fa-fw fa-plus"></i>添加字段</a>
                    <a class="btn btn-success bar-btn" href="/diyform/diyform"><i class="glyphicon glyphicon-chevron-left"></i> 表单管理</a>
                </div>
                <div class="search">

                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <form method="post" action="/diyform/diyform_field/order" class="form-inline" role="form" id="cpform" name="cpform">
                    <input type='hidden' name='modelid' value="{{$modelid}}" />
                    <input type='hidden' name='optype' value="del" />
                    <table class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                            <tr class="text-c">
                                <th>排序</th>
                                <th>字段名</th>
                                <th>别名</th>
                                <th>类型</th>
                                <th>必填</th>
                                <th>禁用</th>
                                <th>管理操作</th>
                            </tr>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td>
                                    <input type='text' class='input-text listorder' name='listorder[]' value='{{$item.listorder}}' style='width: 50px;'>
                                    <input type="hidden"  class='input-text listorder'  name="fieldid[]" value="{{$item.fieldid}}" />
                                </td>
                                <td>{{$item.field}}</td>
                                <td>{{$item.name}}</td>
                                <td>{{$item.fieldtype}}</td>
                                <td>{{update_status('/diyform/diyform_field','cms_model_field','field',$item.field,'isrequired',$item.isrequired)}}</td>
                                <td>{{update_status('/diyform/diyform_field','cms_model_field','field',$item.field,'disabled',$item.disabled)}}</td>
                                <td>
                                    <a href="/diyform/diyform_field/manage/?action=edit&fieldid={{$item.fieldid}}&modelid={{$item.modelid}}"   class="btn btn-warning btn-xs" style="text-decoration:none">修改</a>
                                    <a href="javascript:;" onclick="layer_del('/diyform/diyform_field/delete/?fieldid={{$item.fieldid}}')"  class="btn btn-danger btn-xs" style="text-decoration:none">删除</a>
                                </td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                    </table>
                    <div class="cl pd-5 bg-1 bk-gray"> <span class="l"><input class="btn btn-primary" name="dosubmit" value="排序" type="submit"></span></div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>